6befce
@@ -1108,7 +1108,8 @@
public class HLog implements HConstants, Syncable {
     Path oldLogDir, final FileStatus[] logfiles, final FileSystem fs,
     final Configuration conf) throws IOException {
     final Map<byte [], WriterAndPath> logWriters =
-      new TreeMap<byte [], WriterAndPath>(Bytes.BYTES_COMPARATOR);
+      Collections.synchronizedMap(
+        new TreeMap<byte [], WriterAndPath>(Bytes.BYTES_COMPARATOR));
     List<Path> splits = null;
     
     // Number of threads to use when log splitting to rewrite the logs.
